#include "MysqlMgr.h"


int MysqlMgr::RegUser(const std::string&name, const std::string& email, const std::string& pwd)
{
    return dao_.RegUser(name,email,pwd);
}

bool MysqlMgr::CheckEmail(const std::string& name, const std::string& email)
{
    return dao_.CheckEmail(name,email);
}

bool MysqlMgr::UpdatePassword(const std::string& name, const std::string& pwd)
{
    return dao_.UpdatePassword(name,pwd);
}

bool MysqlMgr::CheckPwd(const std::string& name, const std::string& pwd,UserInfo& userinfo)
{
    return dao_.CheckPwd(name,pwd,userinfo);
}

std::shared_ptr<UserInfo> MysqlMgr::GetUser(int uid)
{
    return dao_.GetUser(uid);
}

std::shared_ptr<UserInfo> MysqlMgr::GetUserByName(const std::string& name)
{
    return dao_.GetUserByName(name);
}

bool MysqlMgr::AddFriendApply(int from_uid,int to_uid)
{
    return dao_.AddFriendApply(from_uid,to_uid);
}

bool MysqlMgr::GetApplyFriendList(int to_uid,std::vector<std::shared_ptr<ApplyInfo>>& apply_list,int offset,int limit)
{
    return dao_.GetApplyFriendList(to_uid,apply_list,offset,limit);
}
